var isStraight = function(nums) {
    nums = nums.sort((a,b)=> {return a-b})
    console.log(nums);
    // nums = nums.map( item => {if(item!= 0 ) return item})
    while(nums[0]==0) nums.shift();
    console.log(nums);
    if(nums[nums.length-1]-nums[0] != 4 ) return false
    return true
};

console.log(isStraight([0,0,1,2,5]));